﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="hotelInformation.aspx.vb" Inherits="travel.hotelDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:PlaceHolder ID="ph_superusers" runat="server">
    This is for superusers only
    
    </asp:PlaceHolder>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="HotelName" HeaderText="HotelName" SortExpression="HotelName" />
            <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
            <asp:ImageField DataImageUrlField="Picture">
                <ControlStyle CssClass="hotelImageDetail" />
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:hotelsConnectionString %>"
        ProviderName="<%$ ConnectionStrings:hotelsConnectionString.ProviderName %>" SelectCommand="SELECT [HotelName], [Description], [Picture] FROM [hotellist] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False">
        <Columns>
            <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" />
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:BoundField DataField="Comment" HeaderText="Comment" SortExpression="Comment" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:hotelsConnectionString %>"
        ProviderName="<%$ ConnectionStrings:hotelsConnectionString.ProviderName %>" SelectCommand="SELECT [Comment], [Title], [Author] FROM [Comments] WHERE ([Hotel_fkid] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="" Name="Hotel_fkid" QueryStringField="ID"
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    Add your comment here:<br />
    <br />
    <br />
    <br />
    Comment Title
    <asp:TextBox ID="tb_title" runat="server"></asp:TextBox>
    <br />
    <br />
    Comment
    <br />
    <asp:TextBox ID="tb_comment" runat="server" Height="112px" TextMode="MultiLine" Width="291px"></asp:TextBox>
    <br />
    <br />
    <asp:Button ID="btn_addComment" runat="server" Text="Add your comment" />
    <br />
    <br />
    <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
        DataSourceID="tagsDataSource" DataTextField="tag" DataValueField="ID" 
        RepeatDirection="Horizontal">
    </asp:CheckBoxList>
    Add new tags here (separated by commas)<br />
<asp:TextBox ID="TextBox1" runat="server" Width="509px"></asp:TextBox>
<br />
<br />
    <asp:SqlDataSource ID="tagsDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:hotelsConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:hotelsConnectionString.ProviderName %>" 
        SelectCommand="SELECT DISTINCT [tag], [ID] FROM [tags]"></asp:SqlDataSource>
    <asp:Button ID="Button1" runat="server" Text="Tag this hotel" />
    <br />
    <br />
</asp:Content>
